1. Field of the Invention
The present invention relates to a computer program product, system, and method for managing track discard requests to include in discard track messages.
2. Description of the Related Art
In a dual cluster system, each cluster includes a processing complex, cache and non-volatile backup storage (NVS). Each cluster is assigned a plurality of volumes, where volumes may be grouped in Logical Subsystems (LSSs). Data being written to a volume may be stored in the cache of the cluster to which the data is assigned. In certain situations, a copy of data in cache is also copied to the NVS of the other cluster to provide a backup copy. In this way, if there is a failure, the modified data in cache is preserved in the other cluster.
Tracks may be removed from cache by a cache controller performing cache management operations to destage tracks in cache to storage and by discard scan processes removing tracks for a volume being deleted. Multiple discard scan processes may concurrently execute to remove tracks in cache for a volume for different sections of the cache. After a track is removed from cache in one cluster, a message must be sent to the other cluster to instruct the other cluster to remove that same track from the NVS providing a backup copy of the track removed from the cache.
There are two methods used to send a message to the NVS to discard tracks removed from the cache the NVS is backing-up, Discard Single Track and Discard Multi Track. When a Discard Single Track method is used, only one track is identified in the message to discard and the mail message will contain additional information to perform congruency checking between the cache data for the track and the NVS data for the track. When a Discard Multi Track method is used, each mail message will indicate multiple tracks to be removed, e.g., 20, and only the track identifier (ID) and track location for each of the tracks are contained in the message data.
To improve performance during host Input/Output (I/O) activity, track discard requests are queued until either a predetermined number, e.g., 20, is accumulated to send in a single discard multiple tracks message or until a predetermined period, e.g., 1 millisecond, has passed, so that any track discard requests accumulated during that 1 millisecond are sent in a single discard multiple tracks message. If there is only one queued request, then a discard single track message may be sent.
The cache controller may also determine whether 1 millisecond has passed without sending a discard message when queued requests exist to cause the presently queued tracks to be sent. There are times when the cache controller will “sleep” for 10 milliseconds at a time due to finding no work to do (i.e. times with no host I/O). Such a 10 millisecond delay in the cache controller will delay the sending of queued track requests that are less than the amount needed for a discard multiple tracks message.
There is a need in the art for improved techniques for managing queued track discard requests.